<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ taglib uri="http://www.ld.com/jsp/plugin" prefix="plugin"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<shield:permssion type="button">
	<form action="${ctxPathA}/oa/work/monthlyReport/addOrUpdate" method="post" autocomplete="off" class="show-info">
		<div class="midtab">
			<a data-target="cg_thisMonth" onclick="thisMonth();" data-sign="this" class="cg_thisMonth current cur " href="javascript:void(0)" >本月月报</a><img src="${ctxPath }/images/icon/import.png" class="inited">&nbsp;&nbsp;&nbsp;
			<a data-target="cg_nextMonth" onclick="nextMonth();" data-sign="next" class="cg_nextMonth" href="javascript:void(0)" >下月计划</a>&nbsp;&nbsp;
		</div>
		<shield:token/>
		<div class="table1">
			<table class="tab-show">
				<input id="id" name="id" type="hidden" maxlength="100" value="${model.id }">
				<colgroup>
					<col width="20%">
					<col width="">
				</colgroup>
				<tr>
					<th>
						<label><font color="red">*</font>标题：</label>
					</th>
					<td colspan="3"><input id="title" type="text" name="title" class=" required" value="${model.title}"></td>
				</tr>
				<tr>
					<th>
						<label><font color="red">*</font>开始日期：</label>
					</th>
					<td><input type="text" id="startDate" name="startDate" value='<c:if test="${not empty model.id }"><fmt:formatDate value="${model.startDate }" pattern="yyyy-MM-dd"/></c:if><c:if test="${empty model.id }">${start }</c:if>' class="Wdate  required"></td>
					<th>
						<label><font color="red">*</font>结束日期：</label>
					</th>
					<td><input type="text" name="endDate" id="endDate" value='<c:if test="${not empty model.id }"><fmt:formatDate value="${model.endDate }" pattern="yyyy-MM-dd"/></c:if><c:if test="${empty model.id }">${end }</c:if>' class="Wdate  required"></td>
				</tr>
				<tr>
					<th>
						<label><font color="red">*</font>本月月报内容：</label>
					</th>
					<td colspan="3"><textarea id="ueditorContents" name="content" class="ueditor  required" style="width:99%;height:300px;" maxlength="400">${model.content}</textarea></td>
				</tr>
				<tr>
					<th>
						<label><font color="red">*</font>总工时：</label>
					</th>
					<td colspan="3"><input maxlength="4" type="text" id="totalHours" name="totalHours" class="number required" value="${model.totalHours}" style="display: inline;width: 12%">小时</td>
				</tr>
			</table>
		</div>
		<div class="table2" style="display: none;">
			<table class="tab-show">
				<colgroup>
					<col width="20%">
					<col width="">
				</colgroup>
				<tr>
					<th>
						<label><font color="red">*</font>标题：</label>
					</th>
					<td colspan="3"><input id="nextMonthTitle" type="text" name="nextMonthTitle" class=" required" value="${model.nextMonthTitle}"></td>
				</tr>
				<tr>
					<th>
						<label><font color="red">*</font>开始日期：</label>
					</th>
					<td><input type="text" id="nextMonthStartDate" name="nextMonthStartDate" value='<c:if test="${not empty model.id }"><fmt:formatDate value="${model.nextMonthStartDate }" pattern="yyyy-MM-dd"/></c:if><c:if test="${empty model.id }">${nextMonthStart }</c:if>' class="Wdate  required"></td>
					<th>
						<label><font color="red">*</font>结束日期：</label>
					</th>
					<td><input type="text" name="nextMonthEndDate" id="nextMonthEndDate" value='<c:if test="${not empty model.id }"><fmt:formatDate value="${model.nextMonthEndDate }" pattern="yyyy-MM-dd"/></c:if><c:if test="${empty model.id }">${nextMonthEnd }</c:if>' class="Wdate  required"></td>
				</tr>
				<tr>
					<th>
						<label><font color="red">*</font>下月计划：</label>
					</th>
					<td colspan="3"><textarea id="ueditorContents1" name="nextMonthContent" class="ueditor  required" style="width:99%;height:300px;" maxlength="400">${model.nextMonthContent}</textarea></td>
				</tr>
				<tr>
					<th>
						<label><font color="red">*</font>总工时：</label>
					</th>
					<td colspan="3"><input maxlength="4" type="text" id="nextMonthTotalHours" name="nextMonthTotalHours" class="number required" value="${model.nextMonthTotalHours}" style="display: inline;width: 12%">小时</td>
				</tr>
			</table>
			<div class="taCenter">
				<input class="button" type="submit" value="提交"/>
				<input class="button default" type="reset" value="重置"/>
			</div>
		</div>
	</form>
	<script>
		function thisMonth(){
			$(".cg_thisMonth").attr("class","cg_thisMonth current cur ");
			$(".cg_nextMonth").attr("class","cg_nextMonth");
			$(".table2").hide();
			$(".table1").show();
		}
		function nextMonth(){
			$(".cg_nextMonth").attr("class","cg_nextMonth current cur ");
			$(".cg_thisMonth").attr("class","cg_thisMonth");
			$(".taCenter").show();
			$(".table1").hide();
			$(".table2").show();
		}
	</script>
</shield:permssion>